<link rel="stylesheet" href="css/page.css" media="all" />
<script type="text/javascript" src="js/qunaer_p.js"></script>
<div class="r_content" id="bind_tao">
    <h3 class="mc_title">
	    <span class="mctit_1"><a href="./soap.html"><span class="mctit_2">回调地址</span></a></span>
        <span class="mctit_1"><span class="mctit_2">去哪儿配置</span></span>
    </h3>
	<div class="qunaertong">
		<iframe name="ifr" style="display:none;"></iframe
		<form action="/call/jh_prod_dt.php" method="post" name="form">
				<p>
					<b class="tit">供应商通信标识:</b>
					<span class="con1"><input type="text" class="inpcon" id="ch_ops" name="Identity"/></span>
					 <a href="###" class="lnk_help">帮助</a>
				</p>
				<p>
					<b class="tit">交互密钥:</b>
					<span class="con1"><input type="text" class="inpcon" name="sign" onkeyup="chPs(this);" id="ch_nps"/></span>
					<a href="###" class="lnk_help">帮助</a>
				</p>
				<p>
					<b class="titid">供应商产品ID:（请在下面的选择项里选择产品）</b>
					<!--<div id="sms_content" contenteditable="true" onclick="getPos();" onkeyup="getPos();" style="overflow-x:hidden" class="defaultTpl" data-sid='' data-pid='' data-lid=''></div>
					<textarea class="tmpSms" style="display:none;"></textarea>-->
				</p>
				<div class="jingqu">
					<span>请选择产品：</span>
					<select name="prodname" id="bindList" ></select>
				</div>
			<div class="clay1">
				<div class="content">
					<div class="boxs">
						<?
						$selectTxt='<option>--------请选择---------</option>';
						foreach($r as $sapply_did=>$applylands){
							foreach($applylands as $lid=>$tickets){
								$selectTxt.='<option value="'.$lid.'">'.$lands[$lid]['title'].'</option>';
						?>
						<div class="box <?=$lands[$lid]['self']?>" data="<?=$lid?>" style="display:none;">
							<dl class="header">
								<dt class="id">供应商产品ID</dt>
								<dt class="title">景区</dt>
								<dd class="paymethod">门票类型</dd>
								<dd class="price">门市价</dd>
								<dd class="price">建议零售价</dd>
								<dd class="price">结算价</dd>
								<dd class="paymethod">选择</dd>	
							</dl>
							<?foreach($tickets as $row){?>
							<dl class="ticket">
								<dt class="id" title="上级供应商ID|产品ID">
								<?=empty($row['sapply_did'])? $memberID:$row['sapply_did'],'|',$row['pid']?></dt>
								<dt class="title"><a class="title" href="scenicDetail.html?lid=<?=$lid?>&did=<?=$memberID?>" target="_blank" ><?=$lands[$lid]['title']?></a></dt>
								<dd class="paymethod"><a><?=$row['ttitle']?></a></dd>
								<dd class="price tprice"><i class="dollar">￥</i><?=$row['tprice']?></dd>
								<dd class="price lprice"><i class="dollar">￥</i><?=$row['uprice']/100?></dd>
								<dd class="price"><strong><i class="dollar">￥</i>
									<?=($row['dprice']+$row['jsprice'])/100?>
									<ul class="tpl_variables">   
										<li><a href="javascript:" class="var" data-code="{pname}" data-txt="<?=empty($row['sapply_did'])? $memberID:$row['sapply_did'],'|',$row['pid']?>
											<?=$lands[$lid]['title']?> &nbsp<?=$row['ttitle']?>"><input name="" type="checkbox" value="" /></a>
										</li>
									</ul>   
									</strong>
								</dd>	
							</dl>   
							<?}?>
						</div>
						<?}}?>
					</div>			
				</div>
			</div>
			<p><input type="submit" class="ok"  value="提交" /></p>
		</form>
	</div> 
</div>
<script type="text/javascript">
$(document).ready(function(){
	// $(".box").hide();
	$("#bindList").html('<?=$selectTxt?>');
	$("#bindList").change(function(){
		_val=$(this).val();
		$(".box").hide();
		$(".box").each(function(i,ele){
			if($(ele).attr("data")==_val)
				$(ele).show();
		});
	});
	
});
</script>